package com.zjitc.dao;

import com.zjitc.model.Cart;
import com.zjitc.model.User;
import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/4/17 16:01
 * @description:
 */

public interface UserDao {


  User checkByUsernameAndPassword(@Param("username") String username,
      @Param("password") String password);

  void insertUser(@Param("username") String username, @Param("password") String password,
      @Param("email") String email, @Param("phone") String phone,
      @Param("question") String question,
      @Param("answer") String answer, @Param("create_time") Date create_time,@Param("update_time") Date update_time,
      @Param("role")Integer role);

  int checkUsernameCount(String username);

  List<Cart> cartLIst(@Param("username") String username);

  void addCart(@Param("uuid") String uuid, @Param("username") String username,@Param("catid") int  catid);

  User findAll(String username);

  void changeRole(String username);
}
